export interface User {
  id: string;
  nickname: string;
  username: string;
  avatar: string;
  roleId: string;
  roleName: string;
  researchGroupId: string;
  researchGroupName: string;
  permissions?: string[];
  researchRoleInfos?: Record<string, number>;
  knowledgeBaseGroupRoleInfos?: Record<string, number>;
}

export interface Message {
  id: string;
  content: string;
  senderId: string;
  timestamp: Date;
  type?: number; // 消息类型：1-文本消息，2-文件消息
  contentSourceList?: ContentSource[]; // 引用的文件列表
}

export interface ContentSource {
  fileId: string;
  fileName: string;
}

export interface Chat {
  id: string;
  name: string;
  participants: User[];
  lastMessage: Message | null;
}

export interface KnowledgeBaseGroupUserRsp {
  userId: number;
  nickname: string;
  knowledgeBaseGroupId: number;
  roleId: number;
}

export interface ResearchGroupUserRsp {
  userId: number;
  nickname: string;
  researchGroupId: number;
  roleId: number;
}